package com.example.coffeesystem.utils;

import lombok.*;

import java.io.Serializable;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
// implements Serializable去除警告
public class PageFen<T> extends Result implements Serializable {

    //总记录数
    private long total;
    //分页的数据
    private List<T> rows;

    public PageFen(long total, List<T> list) {
        this.setFlag(true);
        this.setMessage("分页查询成功");
        this.total = total;
        this.rows = rows;
    }
}
